{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "1d2f4ed1-8839-46e5-b452-7690d29ccba1",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5a99ff9f-c81e-4de2-b892-90bcc802e077",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0 1 2 3 4 5]\n",
      "[[0 1 2]\n",
      " [3 4 5]]\n"
     ]
    }
   ],
   "source": [
    "n=np.arange(6)\n",
    "print(n)\n",
    "# 重塑\n",
    "n1 = n.reshape(2,3)\n",
    "print(n1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "b0ca5b46-8da0-41f9-8d4a-3d41e9e060ad",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1 2 3]\n",
      " [4 5 6]]\n",
      "[[1 2]\n",
      " [3 4]\n",
      " [5 6]]\n"
     ]
    }
   ],
   "source": [
    "n=np.array([[1,2,3],[4,5,6]])\n",
    "print(n)\n",
    "n1=n.reshape(3,2)\n",
    "print(n1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a191ae75-aa6c-4c61-b714-2a0cfbe8f1b5",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "511c18e3-f2ed-47f7-9419-675b786465d4",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "681b8073-08d4-460a-99fe-88fb22671a3f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
